package com.gxuwz.check.service.admin.impl;

import com.gxuwz.check.dao.admin.IStudentDao;
import com.gxuwz.check.model.dto.StudentDto;
import com.gxuwz.check.model.entity.SysStudentEntity;
import com.gxuwz.check.service.admin.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements IStudentService {
    @Autowired
    private IStudentDao studentDao;

    @Override
    public List<StudentDto> list(int page , int classId , int peopleNum) {
        return studentDao.list(page,classId,peopleNum);
    }

    @Override
    public void delete(Integer studentId) {
        studentDao.delete(studentId);
    }

    @Override
    public void edit() {

    }

    @Override
    public void save(SysStudentEntity sysStudentEntity) {
        studentDao.save(sysStudentEntity);
    }

    @Override
    public List<StudentDto> listRandom(int classId, int peopleNum) {
        return studentDao.listRandom(classId,peopleNum);
    }

    @Override
    public SysStudentEntity findStudentById(Integer studentId) {
        return studentDao.findStudentById(studentId);
    }
}
